{% extends "base.html" %}
{% block title %}列表{% endblock %}
{% block content %}
{% if info %}
    <p>{{info}}</p>
{% endif %}
{% if news_list %}
    <table class="table">
        <thead><tr><td>#</td><td>名称</td><td>地图1</td><td>地图2</td></tr></thead>
        <tbody>
         {% for news in news_list %}
        <tr>
            <td>{{ news.id }}</td><td>{{ news.news_name }}</td>

            <td><a href="{% url 'get_dashboard'  news.id %}"> 打开广东地图</a></td>
            <td><a href="{% url 'get_china_dashboard'  news.id %}"> 打开中国地图</a></td>
        </tr>

        {% endfor %}
        </tbody>
    </table>
     {% if is_paginated %}
    <div class="pagination">
        <span class="page-links">
            {% if page_obj.has_previous %}
                <a href="/project?page={{ page_obj.previous_page_number }}">上一页</a>
            {% endif %}
            {% if page_obj.has_next %}
                <a href="/project?page={{ page_obj.next_page_number }}">下一页</a>
            {% endif %}
            <span class="page-current">
                第{{ page_obj.number }}页 ，共{{ page_obj.paginator.num_pages }}页。
            </span>
        </span>
    </div>
    {%endif%}
{% else %}
    <p>没有</p>
{% endif %}
<hr>
{% endblock%}